Naming Tables and Columns
Use the following guidelines to name tables, columns, and field data.
- Site and service names are combined by using either an underscore (for example, MYSITE_UIS) or a period in combination with quotation marks (for example "MYSITE.MYSERVICE").
- The table name is appended to the SITE_SERVICE or "SITE.SERVICE" using a period (for example, MYSITE_UIS.RealTimeValues or "MYSITE.UIS".RealTimeValues).
- Two tables may have the same column name; however, the format of the name varies. For example, Facility ID appears in both the pnt_header_record table and the fac_header table. In the PNT table, the name is facilityid. In the FAC table, the name is facility_id (includes an underscore).
- If you are using a SELECT statement in a query that includes tables with the same column names and you want to retrieve the data from one table in particular, include the table name in the statement (SELECT MYSITE_VHS.HistoricalValues.PointIdLong).
Running ODBC Batch Files
The table and column names can be shown by running the batch files installed in the CygNet\Support\ODBC\Queries folder. Run the following batch files to create .txt files containing the data.
Note: The batch file command-line syntax requires that the site, service, and table names are in all lowercase.
| Batch File | Description | Command Line |
|
oatables.bat |
Names of tables in a service |
For all services: oatables For a specific service: oatables site service |
|
oacolumns.bat |
Names of columns in a table |
oacolumns site service table name |
|
oastats.bat |
Names of indexes on each table (used for query optimization) |
oastats site service table name |

